﻿
FILE(GLOB_RECURSE gpu_files_cu *.cu)

# =============================================

SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/build/bin)

include_directories(/usr/local/cuda-11.4/targets/x86_64-linux/include)

ADD_EXECUTABLE(DJFEC main.cpp ${gpu_files_cu})
ADD_EXECUTABLE(BUA main_BUA.cpp ${gpu_files_cu})
ADD_EXECUTABLE(make_IS main_IS.cpp ${gpu_files_cu})
ADD_EXECUTABLE(IS_filter main_IS_filter.cpp ${gpu_files_cu})
ADD_EXECUTABLE(ABCDEF main_cpu.cpp cdef_cpu.cpp)

SET_PROPERTY(TARGET DJFEC PROPERTY CUDA_ARCHITECTURES 50)
SET_PROPERTY(TARGET BUA PROPERTY CUDA_ARCHITECTURES 50)
SET_PROPERTY(TARGET make_IS PROPERTY CUDA_ARCHITECTURES 50)
SET_PROPERTY(TARGET IS_filter PROPERTY CUDA_ARCHITECTURES 50)

TARGET_LINK_LIBRARIES(DJFEC X11 npps gdal tiff)
TARGET_LINK_LIBRARIES(BUA X11 npps gdal tiff)
TARGET_LINK_LIBRARIES(make_IS X11 npps gdal tiff)
TARGET_LINK_LIBRARIES(IS_filter X11 npps gdal tiff)
TARGET_LINK_LIBRARIES(ABCDEF X11 gdal tiff -lpthread)
